package com.xcw.enums;

/**
 * @author bhx
 * @Class contanst
 * @date 2022/11/8 10:26
 * @Description TODO
 */
public enum Contanst implements Behavior{
    RED("红色",1), GREEN("绿色",2), BLANK("黑色", 3), YELLOW("黄色",4);
    private String name;
    private Integer index;

    Contanst(String color, int i) {
        this.name = color;
        this.index = i;
    }
    Contanst(){

    }
    @Override
    public String toString() {
        return this.index+"_"+this.name;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    @Override
    public String getInfo() {
        return this.getIndex() + "{}" + this.name;
    }

    @Override
    public void print() {
        System.out.println(this.index+"_"+this.name);
    }
}
